package com.lz.test


import spock.lang.Specification
import spock.lang.Unroll

/**
 * @description ${description}*
 * @date 2021-11-23 11:05
 *
 * @author Lizhong
 */
class IDNumberUtilsTest extends Specification {

    @Unroll("身份证号:#idNO 的生日,性别,年龄是#result")
    def getBitAgexTest() {
        expect: "when + then 表达式"
        IDNumberUtils.getBirAgeSex(idNO) == result

        where: "分支逻辑"
        idNO                 || result
        "511333199609158270" || ["birthday": "1996-09-15", "sex": "男", "age": "25"]
        "511333199311318270" || ["birthday": "1993-11-31", "sex": "男", "age": "28"]

        "310168199809187333" || ["birthday": "1998-09-18", "sex": "男", "age": "23"]
        "320168200212084268" || ["birthday": "2002-12-08", "sex": "女", "age": "19"]
        "330168199301214267" || ["birthday": "1993-01-21", "sex": "女", "age": "28"]
        "411281870628201"    || ["birthday": "1987-06-28", "sex": "男", "age": "34"]
        "427281730307862"    || ["birthday": "1973-03-07", "sex": "女", "age": "48"]
        "479281691111377"    || ["birthday": "1969-11-11", "sex": "男", "age": "52"]

    }


}
